<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>系统管理-后台</title>
<link rel="stylesheet" type="text/css" href="/Public/Static/css/layout-default-latest.css" /><link rel="stylesheet" type="text/css" href="/Public/Admin/Default/css/style.css" />
<script type="text/javascript" src="/Public/Static/js/jquery.js"></script><script type="text/javascript" src="/Public/Static/js/jquery.layout-latest.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/Static/js/respond.src.js"></script>
<![endif]-->
</head>
<body>
<div class="ui-layout-north">
	<div class="header">
        <div class="logo"><a href="<?php echo U('Admin/Index/index');?>"><img src="/Public/Admin/Default/images/logo.png" alt="logo"/></a></div>
        <ul class="nav navbar-nav" id="navbar_nav">
            <?php if(is_array($admin_mune)): $i = 0; $__LIST__ = $admin_mune;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li id="menu_<?php echo ($vo['id']); ?>"><a href="#"><?php echo ($vo['name']); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        
        <div class="pull-right">
            <ul>
            	<li>（<?php echo ($admin['username']); ?>）</li>
                <li><a href="<?php echo U('Home/Index/index');?>" target="_blank">网站首页</a></li>
                <li><a href="<?php echo U('Admin/Index/index');?>">后台首页</a></li>
                <li><a href="<?php echo U('Admin/Index/logout');?>">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="ui-layout-west">
    <!-- 边栏 -->
    <div id="sidebar" class="sidebar">
        <!-- 子导航 -->
        <?php if(is_array($admin_mune)): $i = 0; $__LIST__ = $admin_mune;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nav): $mod = ($i % 2 );++$i;?><ul id="menu_<?php echo ($nav['id']); ?>_list" style="display:none;">
          <h3><i class="glyphicon glyphicon-folder-open">★</i> <?php echo ($nav[name]); ?></h3>
          <?php if(is_array($nav['_child'])): $i = 0; $__LIST__ = $nav['_child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><a href="<?php echo U($vo['url'].'?'.$vo['data']);?>" target="main_frame"><i class="glyphicon glyphicon-file">☆</i> <?php echo ($vo['name']); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul><?php endforeach; endif; else: echo "" ;endif; ?>
        <!-- /子导航 -->
    </div>
    <!-- /边栏 -->
</div>
<div class="ui-layout-center">
	<iframe width="100%" height="100%" src="<?php echo U('Admin/Index/welcome');?>" frameborder="0" allowtransparency="true" name="main_frame"></iframe>
</div>
</body>
</html>
<script>
    $(document).ready(function () {
		//头部菜单设置
		$('#sidebar > ul').eq(0).show();
		$('#navbar_nav > li').bind('click',function(e){
			var id = $(this).attr('id');
            $(this).siblings("li").removeClass("select");
            $(this).addClass("select");
			$("#"+id+"_list").siblings('ul').hide();
			$("#"+id+"_list").show();
		})

        $('#sidebar > ul > li').bind('click',function(e){
            $(this).siblings("li").removeClass("select");
            $(this).addClass("select");
        })
		
		$('.dropdown-toggle').mouseenter(function(){
			$('.dropdown-menu').slideDown('slow');
		}).mouseleave(function(){
			$('.dropdown-menu').slideUp('slow');
		});
		
        $('body').layout({
			scrollToBookmarkOnLoad:		false,
			applyDefaultStyles: true,
			north: {
				size:					"auto",
				spacing_open:			0,
				closable:				false,
				resizable:				false
			},
            west__closable:           false,
		});
    });

</script>